<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Registrazione</title>
	<link rel="stylesheet" type="text/css" href="styles/style.css" />
</h:head>
<h:body>
<div id="container">
<div id="box">
<header class="banner" >
<span id="titoloPagina"> Inserisci i dati per completare la registrazione </span>
</header>
<div id="externalborderReg">
<p:spacer height="40px" />
<h:form>
<div id="infoAgg">
	<h:outputText rendered="#{param.esiste==1}" value="La mail inserita è già esistente"/>
	</div>
<h:panelGrid columns="3" id="registerBox" style="margin:0px auto; width:100%">

	<p:outputLabel for="email">Email:</p:outputLabel> 
	<p:inputText id="email" value="#{registerBean.utente.email}" placeholder="Email" required="true"/>
	<p:message for="email" display="icon" />
	
	<p:outputLabel for="nome">Nome:</p:outputLabel> 
	<p:inputText id="nome" value="#{registerBean.utente.nome}" placeholder="Nome" required="true"/>
	<p:message for="nome" display="icon" />
	
	<p:outputLabel for="cognome">Cognome:</p:outputLabel> 
	<p:inputText id="cognome" value="#{registerBean.utente.cognome}" placeholder="Cognome" required="true" />
	<p:message for="cognome" display="icon" />
	
	<p:outputLabel for="citta">Città:</p:outputLabel> 
	<p:inputText id="citta" value="#{registerBean.utente.citta}" placeholder="Città" required="true" />		
	<p:message for="citta" display="icon" />
	
	<p:outputLabel for="via">Via:</p:outputLabel> 
	<p:inputText id="via" value="#{registerBean.utente.via}" placeholder="Via" required="true" />
	<p:message for="via" display="icon" />
	
	<p:outputLabel for="telefono">Telefono:</p:outputLabel> 
	<p:inputText id="telefono" value="#{registerBean.utente.telefono}" placeholder="Telefono" required="true" />
	<p:message for="telefono" display="icon" />
	
	<p:outputLabel for="psw">Password:</p:outputLabel> 
	<p:password id="psw" value="#{registerBean.login.psw}" feedback="true" match="pwd2" label="Password" placeholder="Password" required="true"/>
	<p:message for="psw" display="icon" />
	
	<p:outputLabel for="pwd2">Conferma Password:</p:outputLabel> 
	<p:password id="pwd2" label="Conferma Password" value="#{registerBean.login.psw}" placeholder="Conferma Password" required="true"/>

</h:panelGrid>
<p:spacer height="20px"/>

<div id="centerRegisterButton">
<h:commandLink id="registerlink" action="#{registerBean.register()}" update="registerBox">
<div class="button" id="register">
Registrati
</div>
</h:commandLink>
</div>

</h:form>
</div>
</div>
<div id="push">
</div>
</div>
<div id="footer">
<h:button id="homepage" value="Homepage" outcome="home"></h:button>	
</div>


</h:body>
</html>